package com.hmall.user.enums;

import com.hmall.common.enums.CommonEnum;
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;

/*********************************************************
 **
 ** <br><br>
 ** @ClassName: RequestMethod
 ** @author: yangfeng
 ** @date: 2024/12/19 18:06
 ** @version: 1.0.0
 *********************************************************/
@AllArgsConstructor
@NoArgsConstructor
public enum RequestMethod implements CommonEnum {
    GET(1,"GET"),
    POST(2,"POST"),
    PUT(3,"PUT"),
    DELETE(4,"DELETE");

    @Override
    public Integer getCode() {
        return code;
    }

    @Override
    public String getName() {
        return name;
    }


    public static String getNameByCode(Integer code) {
        return CommonEnum.getByCode(code,RequestMethod.class).name;
    }

    private Integer code;
    private String name;



}
